//
//  ActivityTableViewCell.m
//  UI_元旦豆瓣
//
//  Created by dllo on 15/12/31.
//  Copyright © 2015年 31付冬梅. All rights reserved.
//

#import "ActivityTableViewCell.h"

@implementation ActivityTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self creatActivityCell];
    }
    return self;
}
- (void)creatActivityCell {
    self.bigView = [[UIImageView alloc] init];
    [self.contentView addSubview:_bigView];
    
    self.contentsView = [[UIImageView alloc] init];
    [_bigView addSubview:_contentsView];
    
    self.activityView = [[UIImageView alloc] init];
    [_bigView addSubview:_activityView];
    
    self.titleLabel = [[UILabel alloc] init];
    [_bigView addSubview:_titleLabel];
    
    self.timeLabel = [[UILabel alloc] init];
    [_contentsView addSubview:_timeLabel];
    
    self.addressLabel = [[UILabel alloc] init];
    [_contentsView addSubview:_addressLabel];
    
    self.wisher_countLabel = [[UILabel alloc] init];
    [_contentsView addSubview:_wisher_countLabel];
    
    self.participant_countLabel = [[UILabel alloc] init];
    [_contentsView addSubview:_participant_countLabel];
    
    self.timeView = [[UIImageView alloc] init];
    [_contentsView addSubview:_timeView];
    
    self.addressView = [[UIImageView alloc] init];
    [_contentsView addSubview:_addressView];
    
    self.typeView = [[UIImageView alloc] init];
    [_contentsView addSubview:_typeView];
    
    self.category_nameLabel = [[UILabel alloc] init];
    [_contentsView addSubview:_category_nameLabel];
}
- (void)layoutSubviews {
    [super layoutSubviews];
    _bigView.frame = CGRectMake(20, 10, 330, 240);
    _bigView.image = [UIImage imageNamed:@"bg_eventlistcell@2x.png"];
    
    _contentsView.frame = CGRectMake(2, 50, 326, 185);
    _contentsView.image = [UIImage imageNamed:@"bg_share_large@2x.png"];
    
    _timeView.frame = CGRectMake(10, 0, 30, 30);
    _timeView.image = [UIImage imageNamed:@"icon_date@2x.png"];
    
    _titleLabel.frame = CGRectMake(10, 0, 320, 50);
//    _titleLabel.backgroundColor = [UIColor yellowColor];
    
    _timeLabel.frame = CGRectMake(40, 0, 170, 30);
//    _timeLabel.backgroundColor = [UIColor blueColor];
    
    _addressView.frame = CGRectMake(10, 40, 30, 30);
    _addressView.image = [UIImage imageNamed:@"icon_spot@2x.png"];
    _addressLabel.frame = CGRectMake(40, 40, 170, 30);
//    _addressLabel.backgroundColor = [UIColor cyanColor];
    _typeView.frame = CGRectMake(10, 80, 30, 30);
    _typeView.image = [UIImage imageNamed:@"icon_catalog@2x.png"];
    _category_nameLabel.frame = CGRectMake(40, 80, 170, 30);
//    _category_nameLabel.backgroundColor = [UIColor greenColor];
    _wisher_countLabel.frame = CGRectMake(10, 140, 90, 30);
//    _wisher_countLabel.backgroundColor = [UIColor brownColor];
    _participant_countLabel.frame = CGRectMake(100, 140, 90, 30);
//    _participant_countLabel.backgroundColor = [UIColor blueColor];
    
    _activityView.frame = CGRectMake(220, 60, 100, 150);
    
    
}








- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
